#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

template  <typename TypeA>
inline TypeA max_(TypeA a, TypeA b)
{
    return a > b ? a : b;
}

template <typename TypeB>
inline TypeB max_(const vector<TypeB> &vec)
{
    return *max_element(vec.begin(), vec.end());
}

template <typename TypeC>
inline TypeC max_(const TypeC *array, int size)
{
    return *max_element(array, array + size);
}

int main()
{
    int array[] = {45, 212, 78, 2356, 214};
    int size = 5;
    int size2 = 10;
    vector<int> vec(array, array + size);
    
    //    int a = 15, b = 45;

    cout << max_(array, size) << endl;
    cout << max_(vec) << endl;
    cout << max_(size, size2);
}
